package cn.wolfcode.config;

import cn.wolfcode.tool.YamlPropertySourceFactory;
import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

@Configuration
@PropertySource(value = "classpath:core.yaml",factory = YamlPropertySourceFactory.class)
@MapperScan("cn.wolfcode.mapper")
public class CoreConfig {
    @Bean
    PaginationInterceptor paginationInterceptor(){
        return new PaginationInterceptor();
    }
}
